<?php

  function getSqlInString($page_array) {
    $return_string = "(";
    for ($i = 0; $i < count($page_array); $i++) {
      $return_string .= $page_array[$i] . ", ";
    }
    $return_string = substr($return_string,0,count($return_string)-3);
    $return_string .= ") ";
    return $return_string;
  }

  function addArrayElement($page_array, $new_element) {
    $found = false;
    for ($i = 0; $i < count($page_array); $i++) {
      if ($page_array[$i] == $new_element) {
        $found = true;
        
      }
    }
    if ($found == false) $page_array[] = $new_element;
    return $page_array;
  }
  
?>